package com.sinux.mms.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**消费记录
 * @author WangGan
 * @version 2017年6月10日 上午12:01:34 
 * 
 */
@Entity
@Table(name = "record")
@SuppressWarnings("all")
public class Record {
	
	/**消费记录 ID*/
	private String id;
//	/**会员ID*/
//	private String mid;
//	/**会员姓名*/
//	private String mname;
//	/**会员电话*/
//	private String mphone;
	/**操作*/
	private String opera;
	/**余额*/
	private String balance;
	/**其他*/
	private String other;
	/**时间*/
	private String cdate;
	/**会员*/
	private Member member;
	
	private String temp1;
	private String temp2;
	private String temp3;
	private String temp4;
	
	@Id
	@GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	@GeneratedValue(generator = "system-uuid")
	@Column(name = "id", unique = true, nullable = false, length = 64)
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@Column(name = "opera",  nullable = false, length = 64)
	public String getOpera() {
		return opera;
	}
	public void setOpera(String opera) {
		this.opera = opera;
	}
	@Column(name = "balance",  nullable = false, length = 64)
	public String getBalance() {
		return balance;
	}
	public void setBalance(String balance) {
		this.balance = balance;
	}
	@Column(name = "other",  nullable = false, length = 64)
	public String getOther() {
		return other;
	}
	public void setOther(String other) {
		this.other = other;
	}
	
	@Column(name = "cdate",  nullable = false, length = 64)
	public String getCdate() {
		return cdate;
	}
	public void setCdate(String cdate) {
		this.cdate = cdate;
	}
	
	@ManyToOne(cascade = CascadeType.PERSIST,optional = true)
	@JoinColumn(name = "mid",referencedColumnName = "id")
	public Member getMember() {
		return member;
	}
	public void setMember(Member member) {
		this.member = member;
	}
	
	public String getTemp1() {
		return temp1;
	}
	public void setTemp1(String temp1) {
		this.temp1 = temp1;
	}
	public String getTemp2() {
		return temp2;
	}
	public void setTemp2(String temp2) {
		this.temp2 = temp2;
	}
	public String getTemp3() {
		return temp3;
	}
	public void setTemp3(String temp3) {
		this.temp3 = temp3;
	}
	public String getTemp4() {
		return temp4;
	}
	public void setTemp4(String temp4) {
		this.temp4 = temp4;
	}
	
	
	
	
	
}
